textiter: make the FindLogAttrFunc functions clearer
authorSébastien Wilmet <swilmet@gnome.org>
Tue, 15 Jul 2014 13:24:36 +0000 (15:24 +0200)
committerSébastien Wilmet <swilmet@gnome.org>
Thu, 17 Jul 2014 10:56:56 +0000 (12:56 +0200)
commit76f3866bd35b29edec770e107d8e2bb44fbd5ec9
tree7feca5808eeed0076e6c9ad6245160ab31ac2287
parent37f5f78f810bccda3ff6442686a02ca48ee4b5b4
textiter: make the FindLogAttrFunc functions clearer

- Return true (found) and false (not found) explicitly.
- Set found_offset only when something has been found.

find_backward_cursor_pos_func() was a bit different, the while loop had
the condition "offset > 0" but the return was "offset >= 0". Probably a
micro-optimization, since offset == 0 is always a cursor position.
Anyway now the code is the same as the other functions.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
gtk/gtktextiter.c